# -*- coding: utf-8 -*-
# @Time    : 2022/10/11 21:08
# @Author  : 修远
# @File    : forms.py
# @Comment : 
from wtforms import Form
from wtforms import StringField, PasswordField
from wtforms.validators import Length, DataRequired, Email


class LoginForm(Form):
    email = StringField(
        validators=[
            DataRequired(),
            Length(8, 64),
            Email(message='电子邮箱不合规范')
        ])

    password = PasswordField(
        validators=[
            DataRequired(message='密码不可以为空，请输入你的密码'),
            Length(6, 32)
        ])
